<%@page import="com.project.db.SQLHelper"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	Cookie[] cookie = request.getCookies();
	String id="";
	for (Cookie c : cookie) {
	if (c.getName().equals("userid")) {
		id = c.getValue();
	}
}
	String username = SQLHelper.getName(id);
%>
<html lang="zh-cn">
<head>
<meta charset="utf-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link href="css/app-resume.css" rel="stylesheet">
</head>
<body>
	<nav>
	<div style="width: 100%; height: 5px; background-color: #444;"></div>
	<div class="container">
		<div class="tran">My Resume</div>
		<ul>
			<li><p>
					<%=username%>>，你好。 <a href="/personal.jsp">个人中心</a>
				</p></li>
			<li><a href="http://offerproject.jd-app.com/">退出</a></li>
		</ul>
	</div>
	</nav>
	<div class="container" style="margin-top: 50px;">
		<h3 style="line-height: 35px; font-size: 16px; font-weight: bold;">>投递岗位/My
			Job</h3>
		<div class="edit-item" style="height: 300px;">
			<ul style="margin-left: 0px;">
				<li style="text-align: center;"><span>投递职位：</span> <select>
						<option>C++工程师 阿里巴巴</option>
						<option>JAVA工程师 阿里巴巴</option>
						<option>客户端工程师 阿里巴巴</option>
						<option>客户端工程师 腾讯</option>
						<option>前端工程师 腾讯</option>
						<option>pc端工程师 腾讯</option>
				</select></li>
			</ul>
			<span class="btn" style="margin-top: 80px;" onclick="submitResume();">投递此岗位</span>
		</div>
	</div>
	<script src="js/jquery.min.js"></script>
	<script type="text/javascript">
		function submitResume() {
			var _job = $("select").val();
			$.post("/selectJobAction", {
				job : _job
			}, function(data, state) {
				if (data == "0") {
					alert("投递失败，刷新后重试");
				} else {
					alert("投递成功！");
					location.href = "/personal.jsp";
				}
			}).error(function() {
				alert("未知错误，刷新后请重试");
				location.reload();
			})
		}
	</script>
</body>
</html>